/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lolbuilder.params;

import lolbuilder.Champions.Interf.DummyChamp;
import lolbuilder.build.Build;
import lolbuilder.mainClasses.ItemBuildGenerator;

/**
 *
 * @author chocoboSan
 */
public class Duo<A,B> implements Comparable<Duo<A,B>> {
    public A a;
    public B b;
    
    public Duo(A a, B b) {
        this.a=a;
        this.b=b;
    }

    public int compareTo(Duo<A,B> o) {
        if (o.a instanceof DummyChamp && o.b instanceof Build) {
            DummyChamp one=((DummyChamp)this.a);
            DummyChamp two=((DummyChamp)o.a);
            if (ItemBuildGenerator.scoreCalculation(one.dpsOver100sec, one.timeToDie)>=ItemBuildGenerator.scoreCalculation(two.dpsOver100sec, two.timeToDie)) {
                return -1;
            } else {
                return 1;
            }
        }
        return 0;
    }
}
